package com.jumi.microservice.material.service;

import java.util.ArrayList;
import java.util.Date;

import com.github.pagehelper.PageInfo;
import com.jumi.microservice.material.domain.JmMaterialAttributeValue;

/**
 * @description: 商品属性值组件Service接口
 * @author: ZhangY
 */
public interface JmMaterialAttributeValueService
{
	/**
	 * @Description: 分页+条件查询所有
	 * @Param: [page, size, attrValueName, attrId, attrValueStatus, beginTime, endTime]
	 * @Return: com.github.pagehelper.PageInfo<com.jumi.microservice.material.domain.AttrValue>
	 */
	PageInfo<JmMaterialAttributeValue> findAll(Integer page, Integer size, String attrValueName, Integer attrId, Integer attrValueStatus, Date beginTime, Date endTime);

	/**
	 * @Description: 根据id查询
	 * @Param: [attrValueId]
	 * @Return: com.jumi.microservice.material.domain.AttrValue
	 */
	JmMaterialAttributeValue findById(Integer attrValueId);

	/**
	 * @Description: 增加一条
	 * @Param: [attrValue]
	 * @Return: int
	 */
	int add(JmMaterialAttributeValue attrValue);

	/**
	 * @Description: 更新一条
	 * @Param: [attrValue]
	 * @Return: int
	 */
	int update(JmMaterialAttributeValue attrValue);

	/**
	 * @Description: 根据id删除一条
	 * @Param: [attrValueId]
	 * @Return: int
	 */
	int deleteById(Integer attrValueId, String updateBy);

	/**
	 * @Description: 根据id设置启动状态
	 * @Param: [attrValueId, attrValueStatus]
	 * @Return: int
	 */
	int setStatus(Integer attrValueId, Integer attrValueStatus, String updateBy);

	/**
	 * @Description: 根据attrId查询属性值集合
	 * @Param: [attrIds]
	 */
	ArrayList<Object> findValuesByAttrIds(String attrIds);

	/**
	 * @Description: 获取新增属性的id
	 * @Param: [attrId, attrValueName, createBy]
	 * @Return: int
	 */
	int getAttrValueId(String attrId, String attrValueName, String createBy);
}
